import math
n = 12  # 初始值
times = 13  # 迭代次数，可以根据需要调整
b0 = 3/4
b1 = 1/2 + 1/2*math.sqrt(b0)

for _ in range(times):
    n *= 2  # 每次迭代n的值翻倍
    print(n)
    b0 = b1
    b1 = 1/2 + 1/2 *math.sqrt(b0)

delta = n*(1-b1)
pai = n*math.sqrt(1-b1)
print("n : ", n)
print("delta (difference between the next pai^2, not delta to the real pai^2): ", delta)
print(" pai: ", pai)